package com.magina.nety.http;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/restserve")
public class RestHttpServe {


    @RequestMapping(value = "/postArg",method = RequestMethod.POST)
    public Map testRestArg(@RequestParam("code") String code,
                           @RequestParam("num") Integer num){
        Map map = new HashMap();
        map.put("code",code);
        map.put("num",num);
        return map;
    }
}
